<template>
  <div class="app">
    <h2>我是App组件</h2>
    <Person ref="ren"/>
    <br>
    <School/>
    <br>
    <button @click="test">点我试一试ref写在组件标签上获取的是什么</button>
  </div>
</template>

<script>
  import Person from './components/Person'
  import School from './components/School'

  export default {
    name:'App',
    data() {
      return {
        x:100
      }
    },
    components:{Person,School},
    methods: {
      test(){
        console.log(this)
      }
    },
  } 
</script>

<style>
  .app {
    background-color: skyblue;
    padding: 30px;
    box-shadow: 0 0 10px black;
  }
  h2 {
    color: white;
  }
</style>